package com.hjw.exer;

/**
 * 1、创建教师类，利用this关键字，在创建教师对象时，利用有参构造方法对教师姓名、性别、年龄这三个属性进行属性赋值。
 * @author hjwStrart
 * @create 2022-01-11 10:50
 */
public class Teacher {
    private String name;
    private String gender;
    private Integer age;

    public Teacher() {
    }

    public Teacher(String name, String gender, Integer age) {
        this.name = name;
        this.gender = gender;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return  "姓名=" + name  +
                ", 性别=" + gender +
                ", 年龄=" + age ;
    }
}
